package com.example.mobilesafe;

import android.content.Context;

import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;

import com.example.mobilesafe.dao.BlackNumberDao;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.assertEquals;

@RunWith(AndroidJUnit4.class)
public class BlackNumberDaoTest {

    /**
     * 增加条目的测试方法
     */
    @Test
    public void insert(){
        // 1.在测试类中获取Context
        Context context = InstrumentationRegistry.getInstrumentation().getTargetContext();
        // 2.创建BlackNumberDao实例
        BlackNumberDao dao = BlackNumberDao.getInstance(context);
        // 3.插入数据
        dao.insert("110","1");
    }
}